<template>
    <div class="cont">
        <div class="text-2xl">提现设置</div>
        <CustomForm @submit="submit" :formList="formList"></CustomForm>
    </div>
</template>.

<script setup lang="ts">
import { CustomFormItem, CustomFormState } from '@/components/customForm/types';
import CustomForm from '@/components/customForm/CustomForm.vue';

const formList = reactive<CustomFormItem[]>([
    {label:'是否开启此项功能',key:'state',type: 'radio',options:[
        {label:'开启',value:'1'},
        {label:'关闭',value:'2'}
    ],value:'1'},
    { value: '提交并保存', key: 'submit', type: 'submit' }
])

const submit = (formState: CustomFormState) =>{
    alert('提交结果为' + JSON.stringify(formState))
}
</script>

<style scoped>

</style>